<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <?php include_once MvcReg::$_moduleName . '/views/layout/head.php'; ?>
</head>
<body>
<?php include_once MvcReg::$_moduleName . '/views/layout/woody-prompt.php'; ?>
<?php include_once MvcReg::$_moduleName . '/views/layout/header.php'; ?>
<div id="main">
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-2">
                <?php include_once MvcReg::$_moduleName . '/views/layout/left_menu.php'; ?>
            </div>
            <div class="col-md-10">
                <div class="right-content">
                    <h3>
                        <ol class="breadcrumb"><li><a href="?md=manage&cl=riders&at=riderslist&page=<?php echo $page?>"><i class="fa fa-dashboard"></i><?php echo $menu["breadcrumb_current"]?></a><li class="active">查看</li></li></ol>
                    </h3>
                    <br>
                    <h3>
                        骑手姓名：<?php echo $express_courier ?>&nbsp;&nbsp;&nbsp;&nbsp;
                        骑手电话：<?php echo $express_mobile ?>
                    </h3>
                    <br>
                    <form name="mainform" action="" method="get">
                        <?php echo $hidden_data?>
                        <div class="table-responsive">
                            <div class="panel panel-default">
                                <div class="panel-body form-inline">
                                    <div class="form-group">
                                        <label>完成时间:</label>
                                        <input type="text" name="_start" id="datetimeStart" value="<?php echo $_start ?>" class="form-control input-sm" placeholder=""/>  -  <input type="text" id="datetimeEnd" name="_end" value="<?php echo $_end ?>" class="form-control input-sm" placeholder=""/>
                                    </div>
                                    <input type="hidden" name="id" value="<?php echo $express_mobile ?>">
                                    <button type="submit" class="btn btn-primary">
                                        <span class="glyphicon glyphicon-search"></span>立即查询
                                    </button>
                                </div>
                            </div>
                            <table class="table table-hover">
                                <thead>
                                <tr class="info">
                                    <th>序</th>
                                    <th>运费金额</th>
                                    <th>配货单号</th>
                                    <th>完成时间</th>
                                </tr>
                                </thead>
                                <tbody>
                                <?php
                                $n = 0;
                                if($rsp_list){
                                foreach ($rsp_list as $k => $row) {
                                    $n++;
                                    $item = $n + ($page - 1) * $number_page;
                                    $id = $row["id"];
                                    $express_type =Data::$_express_type[$row["express_type"]] ;
                                    if ($row['express_type'] == "no") {
                                        $express_type= "<label class='red'>".$express_type."</label>";
                                    }

                                    ?>
                                    <tr data-id="<?php echo $id?>">
                                        <td><?php echo $item ?></td>
                                        <td><?php echo $row['express_fee'] ?></td>
                                       <?php  if ($row['status'] == 6) {?>
                                           <td style="color: red" onclick="showE(<?php echo $id;?>)" data-toggle="modal" data-target="#error_remarks"><?php echo $row['ph_no'];?>(异常)</td>
                                       <?php  }else{ ?>
                                           <td><?php echo $row['ph_no'];?></td>
                                      <?php  } ?>

                                        <td><?php echo $row['shop_delivery_time'] ?></td>
                                    </tr>
                                <?php }
                                }
                                ?>
                                </tbody>
                            </table>
                            <div class="page">
                                <div class="pagination pull-left">共<?php echo $total_count ?>笔记录</div>
                                <?php if (!empty($rsp_page_list)) echo $rsp_page_list; ?>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    $("#datetimeStart").datetimepicker({
        format: 'yyyy-mm-dd',
        minView:'month',
        language: 'zh-CN',
        autoclose:true,
        // startDate:new Date()
    }).on("click",function(){
        $("#datetimeStart").datetimepicker("setEndDate",$("#datetimeEnd").val())
    });
    $("#datetimeEnd").datetimepicker({
        format: 'yyyy-mm-dd',
        minView:'month',
        language: 'zh-CN',
        autoclose:true,
        // startDate:new Date()
    }).on("click",function(){
        $("#datetimeEnd").datetimepicker("setStartDate",$("#datetimeStart".val()))
    });
</script>
<?php include_once MvcReg::$_moduleName . '/views/layout/footer.php'; ?>
<?php include_once MvcReg::$_moduleName . '/views/riders/dialog_error_remarks.php'; ?>
</body>
</html>
